Get Dropdown Values
AutomatR.Web.GetDropdownValues
The "Get Dropdown Values" activity in AutomatR's Web Activities category provides a list of dropdown values for a specified web element. This activity is particularly useful when you need to retrieve and analyze the available options within a dropdown menu during web automation.
Properties
Name | Description |
---|---|
Input | |
Element | Allows you to select the web element using the selector window. Use this property if you want to indicate the web element directly within the activity. |
WebElement | Specifies the UI Element variable identified by the "Find Element" or other activities. This allows you to use a previously identified web element in the workflow. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Get Dropdown Values" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Timeout | Specifies the maximum time (in seconds) to wait for the activity to be executed before throwing an exception. Integer variables containing the timeout duration. The default timeout is set in the Constants.Timeout constant. |
Output | |
Result | Outputs a list of strings representing the dropdown values. Use a list variable of type string to store the retrieved values for further processing within the workflow. |
How to use:
- Drag and drop the "Get Dropdown Values" activity onto the workflow.
- Configure the properties by choosing either the direct web element or providing a UI Element variable.
- Optionally, configure the delay and timeout based on your requirements.
- Create a list variable of type string to store the dropdown values (e.g., "dropdownValues").
- Execute the workflow to obtain the dropdown values from the specified web element.
Example: Consider an example where the "Get Dropdown Values" activity is used to retrieve the values from a dropdown menu on a web page:
Get Dropdown Values:
Delay: 2
Timeout: 10
Element: Selector forDropdownElement
Result: dropdownValues
In this example, the activity waits for 2 seconds (optional) and has a timeout of 10 seconds. It retrieves the dropdown values from the web element identified by the selector "forDropdownElement" and stores them in the "dropdownValues" list variable for further use.